.lcomm _locker,1
.lcomm _locker2,1
.text
.globl _atomic_i386_is_lock
_atomic_i386_is_lock:
or $1,%al
lock xchgb %al,_locker
ret

.globl _atomic_i386_unlock
_atomic_i386_unlock:
lock andb $0,_locker
ret


.globl _atomic_i386_get_lock_state
_atomic_i386_get_lock_state:
movb _locker,%al
ret

.globl _atomic_i386_set_lock2
_atomic_i386_set_lock2:
lock orb $1,_locker2
ret

.globl _atomic_i386_is_locked2
_atomic_i386_is_locked2:
movb _locker2,%al
ret
